include layout/header.jade
div.page-content
  div.row
    div.col-md-12
      div.portlet.box.blue
        div.portlet-title
          div.caption 反馈管理
        div.portlet-body
          div.portlet-body(style="padding-bottom:10px")
            form#searchForm.form-inline(role="form",action="/admin/recommend",method="get")
              div.form-group
                input.form-control(type="text",placeholder="用户名",name="username")
              button#searchButton.btn.text-right.btn-success(type="submit") 查询
          //- table#datatable
          table#datatable.table.table-striped.table-bordered.table-hover(data-url="/admin/ajax/recommend")
            thead
              tr
                th(data-name="content") 内容
                th(data-name="username") 用户名
script(type='text/javascript').
      aoColumnDefs = [];
include layout/footer.jade
script(type='text/javascript').
      $(document).ready(function(){
        $("#datatable").on('click','.active',function(){
            var item = $(this);
            $.get("/user/active?id="+$(this).attr("data-id")).success(function(){
                item.removeClass('green active').addClass('yellow lock').text('禁用');
              })
          });
        $("#datatable").on('click','.lock',function(){
            var item = $(this);
            $.get("/user/lock?id="+$(this).attr("data-id")).success(function(){
                item.removeClass('yellow lock').addClass('green active').text('激活');
              })
          });

      });
